package com.lxq.action;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
//加上requestmapping是命名空间
public class helloControllerannoation {
    @RequestMapping("/first")
    public ModelAndView ce(){
    ModelAndView mv=new ModelAndView();
    mv.addObject("message","spring注解的方式");
    mv.setViewName("first");
    return mv;
    }
}